package com.sh.data.engine.domain.datadev.flink.model.domain;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: zigui.zdf
 * @description:
 * @date: 2021/6/4 10:34
 */
@Data
public class FlinkKafkaSourceConfigDomain extends FlinkSourceConfigDomain {

    /**
     * topic
     */
    private String topic;

    /**
     * 0 earliest<br>
     * 1 latest<br>
     * 2 time<br>
     * 3 group-offsets<br>
     * 4 specific-offsets
     */
    private Integer offset;

    /**
     * 启动时间点，offset值为2时生效
     */
    private String startPointTime;

    /**
     * 时间特征：0-procTime,1-eventTime
     */
    private Integer timeType;

    /**
     * timeType值为1时，指定的时间列字段
     */
    private String timeField;

    /**
     * timeType值为1时，指定的延迟时间
     */
    private Integer delayMs;

    /**
     * 当offset是4的时候有用
     */
    private List<PartitionOffset> partitionOffsetList = new ArrayList<>();

    @Data
    public static class PartitionOffset {
        private Integer partition;
        private Long offset;
    }
}
